#define _CRT_SECURE_NO_WARNINGS
#include "Tree.h"
int main()
{
	char arr[] = "ABD##E#H##CF##G##";
	int size = strlen(arr);
	int n = 0;
    BTNode * root = BinaryTreeCreate(arr,size,&n);
	PreOrder(root);
	int ret1 = BinaryTreeSize(root);
	printf("%d \n", ret1);
	int ret2 = BinaryTreeLeafSize(root);
	printf("%d \n", ret2);
	int ret3 = BinaryTreeLeafKSize(root, 4);
	printf("%d\n", ret3);
	BTNode* find = BinaryTreeFind(root, 'C');
	printf("%c ", find->val);
	BTNode* find2 = BinaryTreeFind(root, 'M');
	if (find2 == NULL)
		printf("Not Find");
	int height = BinaryTreeHeight(root);
	printf("%d", height);

	LevelOrder(root);
	if (BinaryTreeComplete(root))
	{
		printf("yes");
	}
	else
	{
		printf("no");
	}

	return 0;
}